package com.wen.service;

import com.wen.pojo.Permission;
import com.wen.pojo.Role;

import java.util.List;

public interface RoleService {

    List<Role> findAll(int page, int size) throws Exception;

    int add(Role role) throws Exception;

    Role findById(int id) throws Exception;

    int deleteById(int id) throws Exception;
    int updateById(Role role) throws Exception;

    List<Permission> findOtherPermissions(int roleId);

    void addPermissionToRole(int roleId, Integer[] permissionId);
}
